#ifndef CAIROPARSER_H
#define CAIROPARSER_H

#define PI 3.14159265
#define GRADIENT_CONST 1638.4
#define TWO_THIRD 0.66666667

#include "ByteArray.h"
#include "Color.h"
#include <cairo/cairo.h>

class CairoParser
{
    public:
        CairoParser(const char *fileName, float resolution = 1);
        void readGraphicsSolidFill();
        void readGraphicsGradientFill();
        void readGraphicsStroke();
        void readGraphicsPath();
    private:
        ByteArray ba;
        Color colorManager;
        float _resolution;
        int _offsetX;
        int _offsetY;
        int _fillType;
        cairo_t *cr;
        cairo_pattern_t *pat;
};

#endif // CAIROPARSER_H
